Integrand size = 49, antiderivative size = 287 \[ \int \frac {\sqrt {c+d \tan (e+f x)} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{\sqrt {a+b \tan (e+f x)}} \, dx=-\frac {(i A+B-i C) \sqrt {c-i d} \text {arctanh}\left (\frac {\sqrt {c-i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a-i b} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {a-i b} f}-\frac {(B-i (A-C)) \sqrt {c+i d} \text {arctanh}\left (\frac {\sqrt {c+i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a+i b} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {a+i b} f}+\frac {(b c C+2 b B d-a C d) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c+d \tan (e+f x)}}\right )}{b^{3/2} \sqrt {d} f}+\frac {C \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b f} \]
-(I*A+B-I*C)*arctanh((c-I*d)^(1/2)*(a+b*tan(f*x+e))^(1/2)/(a-I*b)^(1/2)/(c +d*tan(f*x+e))^(1/2))*(c-I*d)^(1/2)/f/(a-I*b)^(1/2)-(B-I*(A-C))*arctanh((c +I*d)^(1/2)*(a+b*tan(f*x+e))^(1/2)/(a+I*b)^(1/2)/(c+d*tan(f*x+e))^(1/2))*( c+I*d)^(1/2)/f/(a+I*b)^(1/2)+(2*B*b*d-C*a*d+C*b*c)*arctanh(d^(1/2)*(a+b*ta n(f*x+e))^(1/2)/b^(1/2)/(c+d*tan(f*x+e))^(1/2))/b^(3/2)/f/d^(1/2)+C*(a+b*t an(f*x+e))^(1/2)*(c+d*tan(f*x+e))^(1/2)/b/f
Time = 4.70 (sec) , antiderivative size = 441, normalized size of antiderivative = 1.54 \[ \int \frac {\sqrt {c+d \tan (e+f x)} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{\sqrt {a+b \tan (e+f x)}} \, dx=\frac {\frac {b \left (b B c+b (A-C) d+\sqrt {-b^2} (A c-c C-B d)\right ) \text {arctanh}\left (\frac {\sqrt {-c+\frac {\sqrt {-b^2} d}{b}} \sqrt {a+b \tan (e+f x)}}{\sqrt {-a+\sqrt {-b^2}} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {-a+\sqrt {-b^2}} \sqrt {-c+\frac {\sqrt {-b^2} d}{b}}}+\frac {b \left (\sqrt {-b^2} (A c-c C-B d)-b (B c+(A-C) d)\right ) \text {arctanh}\left (\frac {\sqrt {c+\frac {\sqrt {-b^2} d}{b}} \sqrt {a+b \tan (e+f x)}}{\sqrt {a+\sqrt {-b^2}} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {a+\sqrt {-b^2}} \sqrt {c+\frac {\sqrt {-b^2} d}{b}}}+b C \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}+\frac {\sqrt {b} \sqrt {c-\frac {a d}{b}} (b c C+2 b B d-a C d) \text {arcsinh}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c-\frac {a d}{b}}}\right ) \sqrt {\frac {b (c+d \tan (e+f x))}{b c-a d}}}{\sqrt {d} \sqrt {c+d \tan (e+f x)}}}{b^2 f} \]
Integrate[(Sqrt[c + d*Tan[e + f*x]]*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2 ))/Sqrt[a + b*Tan[e + f*x]],x]
((b*(b*B*c + b*(A - C)*d + Sqrt[-b^2]*(A*c - c*C - B*d))*ArcTanh[(Sqrt[-c + (Sqrt[-b^2]*d)/b]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[-a + Sqrt[-b^2]]*Sqrt[ c + d*Tan[e + f*x]])])/(Sqrt[-a + Sqrt[-b^2]]*Sqrt[-c + (Sqrt[-b^2]*d)/b]) + (b*(Sqrt[-b^2]*(A*c - c*C - B*d) - b*(B*c + (A - C)*d))*ArcTanh[(Sqrt[c + (Sqrt[-b^2]*d)/b]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[a + Sqrt[-b^2]]*Sqrt[ c + d*Tan[e + f*x]])])/(Sqrt[a + Sqrt[-b^2]]*Sqrt[c + (Sqrt[-b^2]*d)/b]) + b*C*Sqrt[a + b*Tan[e + f*x]]*Sqrt[c + d*Tan[e + f*x]] + (Sqrt[b]*Sqrt[c - (a*d)/b]*(b*c*C + 2*b*B*d - a*C*d)*ArcSinh[(Sqrt[d]*Sqrt[a + b*Tan[e + f* x]])/(Sqrt[b]*Sqrt[c - (a*d)/b])]*Sqrt[(b*(c + d*Tan[e + f*x]))/(b*c - a*d )])/(Sqrt[d]*Sqrt[c + d*Tan[e + f*x]]))/(b^2*f)
Time = 1.26 (sec) , antiderivative size = 292, normalized size of antiderivative = 1.02, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3042, 4130, 27, 3042, 4138, 2348, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sqrt {c+d \tan (e+f x)} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{\sqrt {a+b \tan (e+f x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sqrt {c+d \tan (e+f x)} \left (A+B \tan (e+f x)+C \tan (e+f x)^2\right )}{\sqrt {a+b \tan (e+f x)}}dx\) |
\(\Big \downarrow \) 4130 |
\(\displaystyle \frac {\int \frac {(b c C-a d C+2 b B d) \tan ^2(e+f x)+2 b (B c+(A-C) d) \tan (e+f x)+2 A b c-C (b c+a d)}{2 \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}dx}{b}+\frac {C \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b f}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \frac {(b c C-a d C+2 b B d) \tan ^2(e+f x)+2 b (B c+(A-C) d) \tan (e+f x)+2 A b c-C (b c+a d)}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}dx}{2 b}+\frac {C \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {(b c C-a d C+2 b B d) \tan (e+f x)^2+2 b (B c+(A-C) d) \tan (e+f x)+2 A b c-C (b c+a d)}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}dx}{2 b}+\frac {C \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b f}\) |
\(\Big \downarrow \) 4138 |
\(\displaystyle \frac {\int \frac {(b c C-a d C+2 b B d) \tan ^2(e+f x)+2 b (B c+(A-C) d) \tan (e+f x)+2 A b c-C (b c+a d)}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)} \left (\tan ^2(e+f x)+1\right )}d\tan (e+f x)}{2 b f}+\frac {C \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b f}\) |
\(\Big \downarrow \) 2348 |
\(\displaystyle \frac {C \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b f}+\frac {\int \left (\frac {b c C-a d C+2 b B d}{\sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}+\frac {-2 b B c-2 A b d+2 b C d+i (2 A b c-2 b C c-2 b B d)}{2 (i-\tan (e+f x)) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}+\frac {2 b B c+2 A b d-2 b C d+i (2 A b c-2 b C c-2 b B d)}{2 (\tan (e+f x)+i) \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}\right )d\tan (e+f x)}{2 b f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {C \sqrt {a+b \tan (e+f x)} \sqrt {c+d \tan (e+f x)}}{b f}+\frac {-\frac {2 b \sqrt {c-i d} (i A+B-i C) \text {arctanh}\left (\frac {\sqrt {c-i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a-i b} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {a-i b}}-\frac {2 b \sqrt {c+i d} (B-i (A-C)) \text {arctanh}\left (\frac {\sqrt {c+i d} \sqrt {a+b \tan (e+f x)}}{\sqrt {a+i b} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {a+i b}}+\frac {2 (-a C d+2 b B d+b c C) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a+b \tan (e+f x)}}{\sqrt {b} \sqrt {c+d \tan (e+f x)}}\right )}{\sqrt {b} \sqrt {d}}}{2 b f}\) |
Int[(Sqrt[c + d*Tan[e + f*x]]*(A + B*Tan[e + f*x] + C*Tan[e + f*x]^2))/Sqr t[a + b*Tan[e + f*x]],x]
((-2*b*(I*A + B - I*C)*Sqrt[c - I*d]*ArcTanh[(Sqrt[c - I*d]*Sqrt[a + b*Tan [e + f*x]])/(Sqrt[a - I*b]*Sqrt[c + d*Tan[e + f*x]])])/Sqrt[a - I*b] - (2* b*(B - I*(A - C))*Sqrt[c + I*d]*ArcTanh[(Sqrt[c + I*d]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[a + I*b]*Sqrt[c + d*Tan[e + f*x]])])/Sqrt[a + I*b] + (2*(b*c* C + 2*b*B*d - a*C*d)*ArcTanh[(Sqrt[d]*Sqrt[a + b*Tan[e + f*x]])/(Sqrt[b]*S qrt[c + d*Tan[e + f*x]])])/(Sqrt[b]*Sqrt[d]))/(2*b*f) + (C*Sqrt[a + b*Tan[ e + f*x]]*Sqrt[c + d*Tan[e + f*x]])/(b*f)
3.2.31.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[(Px_)*((c_) + (d_.)*(x_))^(m_.)*((e_) + (f_.)*(x_))^(n_.)*((a_.) + (b_. )*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Px*(c + d*x)^m*(e + f*x)^ n*(a + b*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && PolyQ[P x, x] && (IntegerQ[p] || (IntegerQ[2*p] && IntegerQ[m] && ILtQ[n, 0])) && !(IGtQ[m, 0] && IGtQ[n, 0])
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_. ) + (f_.)*(x_)]^2), x_Symbol] :> Simp[C*(a + b*Tan[e + f*x])^m*((c + d*Tan[ e + f*x])^(n + 1)/(d*f*(m + n + 1))), x] + Simp[1/(d*(m + n + 1)) Int[(a + b*Tan[e + f*x])^(m - 1)*(c + d*Tan[e + f*x])^n*Simp[a*A*d*(m + n + 1) - C *(b*c*m + a*d*(n + 1)) + d*(A*b + a*B - b*C)*(m + n + 1)*Tan[e + f*x] - (C* m*(b*c - a*d) - b*B*d*(m + n + 1))*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[m, 0] && !(IGtQ[n, 0] && ( !IntegerQ[m] || (EqQ[ c, 0] && NeQ[a, 0])))
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, S imp[ff/f Subst[Int[(a + b*ff*x)^m*(c + d*ff*x)^n*((A + B*ff*x + C*ff^2*x^ 2)/(1 + ff^2*x^2)), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, c, d, e, f , A, B, C, m, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]
Timed out.
\[\int \frac {\sqrt {c +d \tan \left (f x +e \right )}\, \left (A +B \tan \left (f x +e \right )+C \tan \left (f x +e \right )^{2}\right )}{\sqrt {a +b \tan \left (f x +e \right )}}d x\]
Leaf count of result is larger than twice the leaf count of optimal. 39018 vs. \(2 (225) = 450\).
Time = 105.64 (sec) , antiderivative size = 78051, normalized size of antiderivative = 271.95 \[ \int \frac {\sqrt {c+d \tan (e+f x)} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{\sqrt {a+b \tan (e+f x)}} \, dx=\text {Too large to display} \]
integrate((c+d*tan(f*x+e))^(1/2)*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan( f*x+e))^(1/2),x, algorithm="fricas")
\[ \int \frac {\sqrt {c+d \tan (e+f x)} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{\sqrt {a+b \tan (e+f x)}} \, dx=\int \frac {\sqrt {c + d \tan {\left (e + f x \right )}} \left (A + B \tan {\left (e + f x \right )} + C \tan ^{2}{\left (e + f x \right )}\right )}{\sqrt {a + b \tan {\left (e + f x \right )}}}\, dx \]
integrate((c+d*tan(f*x+e))**(1/2)*(A+B*tan(f*x+e)+C*tan(f*x+e)**2)/(a+b*ta n(f*x+e))**(1/2),x)
Integral(sqrt(c + d*tan(e + f*x))*(A + B*tan(e + f*x) + C*tan(e + f*x)**2) /sqrt(a + b*tan(e + f*x)), x)
\[ \int \frac {\sqrt {c+d \tan (e+f x)} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{\sqrt {a+b \tan (e+f x)}} \, dx=\int { \frac {{\left (C \tan \left (f x + e\right )^{2} + B \tan \left (f x + e\right ) + A\right )} \sqrt {d \tan \left (f x + e\right ) + c}}{\sqrt {b \tan \left (f x + e\right ) + a}} \,d x } \]
integrate((c+d*tan(f*x+e))^(1/2)*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan( f*x+e))^(1/2),x, algorithm="maxima")
integrate((C*tan(f*x + e)^2 + B*tan(f*x + e) + A)*sqrt(d*tan(f*x + e) + c) /sqrt(b*tan(f*x + e) + a), x)
Timed out. \[ \int \frac {\sqrt {c+d \tan (e+f x)} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{\sqrt {a+b \tan (e+f x)}} \, dx=\text {Timed out} \]
integrate((c+d*tan(f*x+e))^(1/2)*(A+B*tan(f*x+e)+C*tan(f*x+e)^2)/(a+b*tan( f*x+e))^(1/2),x, algorithm="giac")
Timed out. \[ \int \frac {\sqrt {c+d \tan (e+f x)} \left (A+B \tan (e+f x)+C \tan ^2(e+f x)\right )}{\sqrt {a+b \tan (e+f x)}} \, dx=\text {Hanged} \]